﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Principal;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;
using Volo.Abp.OpenIddict.Applications;

namespace Himp.Platform
{
    /// <summary>
    /// 主题配置
    /// 相当于领域
    /// </summary>
    public class AppTopic : AuditedEntity<Guid>, IMultiTenant
    {
        public Guid AppModuleId { get; set; }

        public AppModule AppModule { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string TopicCode { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string TopicName { get; set; }

        /// <summary>
        /// 内容描述
        /// </summary>
        public string? Descr { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public Guid? ParentId { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public AppTopic? Parent { get; set; }

        /// <summary>
        /// 上级
        /// </summary>
        public List<AppTopic> Children { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public int Srtno { get; set; }

        ///// <summary>
        ///// 
        ///// </summary>
        //public List<EChartConfig> EChartConfigs { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public List<DataTableDict> DataTableDicts { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public List<DataFormDict> DataFormDicts { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public List<DataModelDict> DataModelDicts { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public Guid? TenantId { get; set; }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="topicCode"></param>
        /// <param name="topicName"></param>
        /// <param name="openIddictApplicationId"></param>
        /// <param name="parentId"></param>
        /// <param name="srtno"></param>
        public AppTopic(string topicCode, string topicName, Guid? parentId, int srtno = 0)
        {
            TopicCode = topicCode;
            TopicName = topicName;
            Srtno = srtno;
            ParentId = parentId;
        }

        public AppTopic()
        { 
        
        }
    }
}
